<?php

/**
 * @package Framework03
 * @author Walter Tamboer
 */

/**
 * Used to render plain text templates
 */
class PlainTextRenderDevice extends RenderDevice
{
	/**
	 * @var string The source to output to the screen.
	 */
	private $Source;
	/**
	 * @var string The content type to output the source in.
	 */
	private $ContentType;
	/**
	 * Initializes a new instance of this class.
	 * @param string $ContentType The content type to output in.
	 */
	public function __construct($Source, $ContentType = 'text/plain')
	{
		$this->Source = $Source;
		$this->ContentType = $ContentType;
	}
	/**
	 * Gets the rendered content.
	 * @return string Returns a string with the parsed content.
	 */
	public function Render()
	{
		header('Content-Type: ' . $this->ContentType);

		echo $this->Source;
	}
}

?>